package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: tcz
 * Date: 13-6-26
 * Time: 上午9:01
 */
public class Book {
    private String id;
    private String title;
    private int num;

    public Book(String id, String title,int num) {
        this.id = id;
        this.title = title;
        this.num = num;
    }
    public boolean isAvailable(){
        return (num>0);
    }

    public void reserved() {
        num--;
    }

    public String getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }

    public int getNum() {
        return num;
    }
}
